﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Input;
using WpfApplication5.Models;

namespace WpfApplication5.ViewModels
{
    public class FunctionTreeViewModel
    {
        readonly ReadOnlyCollection<FunctionCategoryViewModel> _categories;
        

        public FunctionTreeViewModel(List<FunctionCategory> categories,SQLiteDatabase db)
        {
            _categories = new ReadOnlyCollection<FunctionCategoryViewModel>(
                (from cate in categories select new FunctionCategoryViewModel(cate,null,db)).ToList());
        }

        public ReadOnlyCollection<FunctionCategoryViewModel> Categories
        {
            get { return _categories; }
        }

        
    }
}
